import { createStore } from 'vuex'

const commonProps = {
  width: 100,
  height: 100,
  left: 0,
  top: 0
  // borderStyle: 'solid',
  // borderColor: 'none',
  // borderWidth: 0,
  // opacity: 1,
  // borderRadius: 0
}

const propertyComponent = {
  text: {
    component: 'my-input',
    label: '文本'
  },
  src: {
    component: 'my-input',
    label: '图片链接'
  },
  width: {
    component: 'a-input-number',
    label: '宽度'
  },
  height: {
    component: 'a-input-number',
    label: '高度'
  },
  top: {
    component: 'a-input-number',
    label: '上边距'
  },
  left: {
    component: 'a-input-number',
    label: '左边距'
  }
}
console.log(propertyComponent)
export default createStore({
  state: {
    components: [
      {
        name: 'myText',
        title: '文本组件',
        props: {
          style: {
            ...commonProps,
            color: ''
          },
          text: undefined
        }
      }, {
        name: 'myImage',
        title: '图片组件',
        props: {
          style: {
            ...commonProps
          },
          src: undefined
        }
      }
    ],
    propertyComponent
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
  }
})
